package com.realtyManage.springboot.Dao;

import com.realtyManage.springboot.Model.Do.Shop;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface ShopRepository extends JpaRepository<Shop,Integer> {

    List<Shop> findByState(int state);

    List<Shop> findByName(String shopName);

    @Query("select id from Shop where name like %?1%")
    List<String> findByNameLike(String shopName);
}
